package com.ruoyi.system.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.OrderAuthenticationTimer;
import com.ruoyi.system.mapper.OrderAuthenticationTimerMapper;
import com.ruoyi.system.service.IOrderAuthenticationTimerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 订单实名认证定时器Service业务层处理
 *
 * @author hjf
 * @date 2025-05-19
 */
@Service
public class OrderAuthenticationTimerServiceImpl implements IOrderAuthenticationTimerService {
    @Autowired
    private OrderAuthenticationTimerMapper orderAuthenticationTimerMapper;

    /**
     * 查询订单实名认证定时器
     *
     * @param id 订单实名认证定时器主键
     * @return 订单实名认证定时器
     */
    @Override
    public OrderAuthenticationTimer selectOrderAuthenticationTimerById(Long id) {
        return orderAuthenticationTimerMapper.selectOrderAuthenticationTimerById(id);
    }

    /**
     * 查询订单实名认证定时器列表
     *
     * @param orderAuthenticationTimer 订单实名认证定时器
     * @return 订单实名认证定时器
     */
    @Override
    public List<OrderAuthenticationTimer> selectOrderAuthenticationTimerList(OrderAuthenticationTimer orderAuthenticationTimer) {
        return orderAuthenticationTimerMapper.selectOrderAuthenticationTimerList(orderAuthenticationTimer);
    }

    /**
     * 新增订单实名认证定时器
     *
     * @param orderAuthenticationTimer 订单实名认证定时器
     * @return 结果
     */
    @Override
    public int insertOrderAuthenticationTimer(OrderAuthenticationTimer orderAuthenticationTimer) {
        orderAuthenticationTimer.setCreateTime(DateUtils.getNowDate());
        return orderAuthenticationTimerMapper.insertOrderAuthenticationTimer(orderAuthenticationTimer);
    }

    /**
     * 修改订单实名认证定时器
     *
     * @param orderAuthenticationTimer 订单实名认证定时器
     * @return 结果
     */
    @Override
    public int updateOrderAuthenticationTimer(OrderAuthenticationTimer orderAuthenticationTimer) {
        orderAuthenticationTimer.setUpdateTime(DateUtils.getNowDate());
        return orderAuthenticationTimerMapper.updateOrderAuthenticationTimer(orderAuthenticationTimer);
    }

    /**
     * 批量删除订单实名认证定时器
     *
     * @param ids 需要删除的订单实名认证定时器主键
     * @return 结果
     */
    @Override
    public int deleteOrderAuthenticationTimerByIds(Long[] ids) {
        return orderAuthenticationTimerMapper.deleteOrderAuthenticationTimerByIds(ids);
    }

    /**
     * 删除订单实名认证定时器信息
     *
     * @param id 订单实名认证定时器主键
     * @return 结果
     */
    @Override
    public int deleteOrderAuthenticationTimerById(Long id) {
        return orderAuthenticationTimerMapper.deleteOrderAuthenticationTimerById(id);
    }
}
